package com.dhwl.hsh.driver.ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.dhwl.hsh.lib.view.viewpagerindicator.TabPageIndicator;
import com.dhwl.hsh.driver.R;
import com.dhwl.hsh.driver.ui.adapter.OrderTabPageAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;

/**
 * 设置页面
 * 
 * @author  hjd008
 * @version  [版本号, 2015-1-6]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public class MyOrderFragment extends BaseFragment
{

    @Bind(R.id.order_status_indicator)
    TabPageIndicator tabPageIndicator;

    @Bind(R.id.vp_order_list)
    ViewPager viewPager;


    private List<Fragment> frameList = new ArrayList<Fragment>();

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_my_orders;
    }


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    protected void initViews(View self, Bundle savedInstanceState) {
        setTitleContent(R.string.function_bar_my_order);

        FragmentPagerAdapter adapter = new OrderTabPageAdapter(getActivity(),getChildFragmentManager());
        viewPager.setAdapter(adapter);
        tabPageIndicator.setViewPager(viewPager);
        viewPager.setCurrentItem(0);

    }

    @Override
    protected void initData() {

    }


    

}
